package vsy.buzzwordbingo.sort;



import vsy.buzzwordbingo.model.Game;

public class GameTitleComparator extends OrderedComparator<Game> {
	public GameTitleComparator(Order order) {
		super(order);
	}

	@Override
	public int orderedCompare(Game g1, Game g2) {
		if (g1.getTitle() == null || g2.getTitle() == null)
			return nullCompare(g1.getTitle(), g2.getTitle());
		
		return g1.getTitle().compareTo(g2.getTitle());
	}
}
